package com.un.ebs.product.mapper;

import com.un.ebs.product.domain.ProductPackImage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liubo
 * @since 2019-11-09
 */
@Component
public interface ProductPackImageMapper extends BaseMapper<ProductPackImage> {
    @Select("select isnull(max(sort)+1,1) from tb_product_pack_image where pack_id=#{packId}")
    int maxSort(@Param("packId") String packId);

}
